<layout name='layout' />

<div class="admin-main">

	<blockquote class="layui-elem-quote">
		<button class="layui-btn layui-btn-small layui-btn-normal" onclick="openModel('<{:U('Shouzhi/add',array('type'=>1))}>','添加收入','80%','80%');">
			<i class="fa fa-plus"></i> 添加收入
		</button>
		<button class="layui-btn layui-btn-small layui-btn-danger" onclick="openModel('<{:U('Shouzhi/add',array('type'=>2))}>','添加支出','80%','80%');">
			<i class="fa fa-plus"></i> 添加支出
		</button>

		<button class="layui-btn layui-btn-small" onclick="window.location.reload();">
			<i class="fa fa-refresh"></i> 刷新
		</button>

		<button class="layui-btn layui-btn-small layui-btn-danger" id="delBtn">
			<i class="fa fa-close"></i> 删除
		</button>

		<div class="search">
			<form class="layui-form" method="post" action="<{:U('Shouzhi/index')}>">
			
			<div class="layui-input-inline">
			<select name="type" id="type">
	    		<option value="">类型</option>
				<option value="1">收入</option>
				<option value="2">支出</option>
	        </select>
			</div>
			<div class="layui-input-inline">
			<input type="text" name="keyword" placeholder="关键词" class="layui-input layui-btn-small">
			</div>
			<div class="layui-input-inline">
				<input type="text" name="startDate" placeholder="开始日期" class="layui-input" onclick="layui.laydate({elem: this})">
			</div>
			<div class="layui-input-inline">
				<input type="text" name="endDate" placeholder="截止日期" class="layui-input" onclick="layui.laydate({elem: this})">
			</div>
			<button type="submit" class="layui-btn" lay-submit=""><i class="layui-icon">&#xe615;</i> 搜索</button>
			<a href="<{:U('Shouzhi/index')}>" class="layui-btn layui-btn-primary">重置</a>
			</form>
		</div>
	</blockquote>

	<fieldset class="layui-elem-field">
		<legend>数据列表</legend>

		<div class="layui-field-box">
			<form id="ajaxForm" method="post" action="<{:U('Shouzhi/del')}>">
			<table class="site-table table-hover">
				<thead>
					<tr>
						<th><input type="checkbox" id="selected-all"></th>									
						<th>类型</th>
						<th>金额</th>
						<th>事由</th>
						<th>发生日期</th>
						<th>操作员</th>
						<th>添加日期</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody><!--minus-->
					<tr>
						<td colspan="8" style="text-align: right;">合计：<span style="font-weight: bold; font-size: 18px"><{$total}></span>，收入：<span style="color: blue"><{$shouru}></span>，支出：<span style="color: red"><{$zhichu}></span></td>
					</tr>
					<volist name="list" id="vo">
					<tr>
						<td><input type="checkbox" name="selectedids[]" value="<{$vo.id}>"></td>
						<td><eq name="vo.type" value="1"><span style="color: blue">收入</span><else/><span style="color: red">支出</span></eq></td>
						<td><{$vo.money}></td>
						<td><{$vo.title}></td>		
						<td><{$vo.actionDate|date="Y-m-d",###}></td>	  
						<td><{$vo.doName}></td>	  
						<td><{$vo.createTime|date='Y-m-d H:i:s',###}></td>
						<td>							
							<a href="javascript:void(0)" onclick="openModel('<{:U('Shouzhi/edit',array('id'=>$vo['id']))}>','编辑','80%','80%');" class="layui-btn layui-btn-mini">编辑</a>
						</td>
					</tr>	
					</volist>				
				</tbody>
			</table>
			</form>
		</div>
	</fieldset>
</div>

